
<?	if(!isset($_SESSION['uid']))
	//////////////////////// NOT LOGGED
	echo "<div id='dashboard' class='unplugged'>", engine_get('control.public'), "secured login</div>";
	 
else {
	////////////////////////////////////////// LOGGED
	define("CENTRAL", "http://central.onedotonly.be/style/control.room/", true);
	
	////////////////////////////////////////// EXTENTION SETUP
	// Respective classing of engine CMS objects:
	// 1]	Window								>> root
	// 2]	Window elements						>> root >> win.asset
	// 3]	Dashboard							>> root
	// 4]	Dashboard elements ("extentions")	>> root >> dashboard.ext

?>

<div id="dashboard" class="plugged"></div>


<script type='text/javascript'>
	<?
	////////////////////////////////////////// WINDOW ELEMENTS
	include "dashboard._init.php";
	include "dashboard.win.php";
	include "dashboard._proto_.php";
	include "dashboard.input.php";
	include "dashboard.list.php";
	include "dashboard.float.php";
	include "dashboard.contr.php";
	include "dashboard.contr.html.php";
	?>
</script>

<script src="http://central.onedotonly.be/js/swfupload/swfupload.js" type="text/javascript"></script>
<script src="http://central.onedotonly.be/js/swfupload/extend.js" type="text/javascript"></script>
<script src="http://central.onedotonly.be/js/cropper/cropper.uncompressed.js" type="text/javascript"></script>

<script type='text/javascript'>
	
	<?
	////////////////////////////////////////// DASHBOARD EXTENTIONS
	include "dashboard.extend.php";
	
	$has_custom = is_dir( $custom_path = ROOT . ACCOUNT ."/custom.root/control/extend" );
	
	$dir = opendir( ENGINE_CORE . "control/dashboard/extend" );
	while (false !== ( $current = readdir( $dir ))) 
		if( strpos( $current, "." ) !== 0 )
			include ( $has_custom && file_exists( "$custom_path/$current" ))? "$custom_path/$current" : "extend/$current";
	
	?>

	////////////////////////////////////////// ACTIVATE THE ENGINE!
	dashboard.seed();
	//foo.comment("foo");
	
	//$('column_left').insert( new Win( "init" ).request({ type:"init", action:"pages", transfer_type:"win" } ) );
	
	if( !init.dashboard.jump ) init.dashboard.jump = [];
	init.dashboard.jump.unshift({ "type":"init", "action":"pages" });
	
	init.dashboard.jump.each( function( obj ){
		$('column_left').insert( new Win( obj.type ).request({ type:obj.type, action:obj.action, transfer_type:"win", vars:obj.vars }));
	});
	
	
	
	
	////////////////////////////////////////// ACTIVATE EXTENTIONS
	$("dashboard.btn.refresh").insert({ "before": new dashboard.ext.calendar.addbutton() });
	$("dashboard.btn.refresh").insert({ "before": new dashboard.ext.admin.addbutton() });
	$("dashboard.btn.refresh").insert({ "before": new dashboard.ext.translate.addbutton() });
	$("dashboard.btn.refresh").insert({ "before": new dashboard.ext.csv.addbutton() });
	
	
</script>

<? } ?>

</body>
</html>